#include <iostream>
using namespace std;
int main()
{
    int n;
    cin >> n;
    int nums[n + 1];
    int help[n + 1] = {0};
    for (int i = 1; i <= n; i++)
    {
        cin >> nums[i];
        help[i] = help[i - 1] ^ nums[i];
    }
    int k;
    cin >> k;
    int res = 0;
    for (int i = 1; i <= n; i++)
    {
        for (int j = i; j <= n; j++)
        {
            //记得加括号， 按位异或 运算级低
            if ((help[j] ^ help[i - 1]) == k){
                res++;
            }
        }
    }
    cout << res;
    return 0;
}